package com.app.couponsharelife.utils

import android.content.Context
import android.util.TypedValue

/**
 *Created by xct on 2019/1/9
 *Description:
 */
object CardConfig {
    //屏幕上最多同时显示几个Item
    var MAX_SHOW_COUNT: Int = 0

    //每一级Scale相差0.05f，translationY相差7dp左右
    var SCALE_GAP: Float = 0.toFloat()
    var TRANS_Y_GAP: Int = 0

    fun initConfig(context: Context,count:Int,gap:Float,trans:Float) {
        MAX_SHOW_COUNT = count
        SCALE_GAP = gap
        TRANS_Y_GAP = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, trans, context.resources.displayMetrics).toInt()
    }
}